Runge' s phenomenon
Visualization of lagrange interplotation of 1/(1 + 25 x^2)
This is a translated version of Yanshu Wang's programming homework at Numerical Analysis course.
Powered by WolframScript and wolfram-js-frontend.
Code:
Manipulate[
Plot[{InterpolatingPolynomial[
Table[{x, N[1/(1 + 25*x^2)]}, {x, -1, 1, 1/n}], x],
1/(1 + 25*x^2)}, {x, -1, 1}], {n, 1, 50, 1}]
Result:
Manipulate[
Plot[{InterpolatingPolynomial[
Table[{x, N[1/(1 + 25*x^2)]}, {x, -1, 1, 1/n}], x],
1/(1 + 25*x^2)}, {x, -1, 1}], {n, 1, 50, 1}]
Created Sat 12 Oct 2024 22:18:20